'use strict';
//获取数据库
const db = uniCloud.database()
  
exports.main = async (event, context) => {
	let str ;
	if(event.typeid!=undefined){
		str = {
			typeid:event.typeid
		}
	}else{
		str ={
			
		}
	}
	let result = await db.collection('GoodInfo').where(str).get()
	return {
		code: 200,
		msg: '数据请求成功',
		data: result.data
	}
};
